﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Home.LastNews.ascx.cs" Inherits="Controls_Home_LastNews" %>
<div class="h_c2" style="position:relative;">
    <div class="h_title2">
        <a href="#" class="active" rel="news">MỚI NHẤT</a>&nbsp; &nbsp; | &nbsp; &nbsp;
        <a href="#" rel="top">ĐỌC NHIỀU</a></div>
    <div id="news" style="position:absolute;">
        <asp:Repeater ID="rptList" runat="server">
            <ItemTemplate>
                <div class="h_dong3">
                    <a href="<%#Eval("Url") %>">
                        <%#Eval("Title") %></a></div>
            </ItemTemplate>
        </asp:Repeater>
    </div>
    <div id="top" style="display:none;position:absolute;">
        <asp:Repeater ID="rptTop" runat="server">
            <ItemTemplate>
                <div class="h_dong3">
                    <a href="<%#Eval("Url") %>">
                        <%#Eval("Title") %></a></div>
            </ItemTemplate>
        </asp:Repeater>
    </div>
</div>
<script language="javascript" type="text/javascript">
    $(".h_title2 a").click(function (e) {
        $(".h_title2 a").removeClass();
        if ($(this).attr('rel') == 'top') {
            $('#news').fadeOut();
            $('#top').fadeIn();
        }
        if ($(this).attr('rel') == 'news') {
            $('#news').fadeIn();
            $('#top').fadeOut();
        }
        $(this).removeClass().addClass('active');
    });
    function HideDiv() {

    }
</script>
